package com.example.leavls.service.impl;

import com.example.leavls.mapper.LeaveMapper;
import com.example.leavls.pojo.Leaverecords;
import com.example.leavls.service.LeaveService;
import com.example.leavls.util.RespPageEntity;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;
@Service
public class LeaveServiceimpl implements LeaveService {
@Resource
private LeaveMapper leaveMapper;

    @Override
    public List<Leaverecords> getAllbypage(Integer page ,Integer size) {
        return leaveMapper.getAllbypage(page,size);
    }

    @Override
    public int addLeave(Leaverecords leaverecords) {
        return leaveMapper.addLeave(leaverecords);
    }

    @Override
    public int delLeave(Integer id) {
        return leaveMapper.delLeave(id);
    }

    @Override
    public int updLeave(Leaverecords leaverecords) {
        return leaveMapper.updLeave(leaverecords);
    }

    @Override
    public Leaverecords getOne(Integer id) {
        return leaveMapper.getOne(id);
    }

    @Override
    public Long getTotal() {
        return leaveMapper.getTotal();
    }

}
